Add deferrable support for Cloud Functions invoke operator#69853
Add deferrable support for Cloud Functions invoke operator#69853qotique wants to merge 1 commit into
Conversation
|
Congratulations on your first Pull Request and welcome to the Apache Airflow community! If you have any issues or are unsure about any anything please check our Contributors' Guide
|
46c5d70 to
13a8e19
Compare
13a8e19 to
568a10c
Compare
568a10c to
862cce3
Compare
3264ad9 to
f4f78ab
Compare
- Add CloudFunctionInvokeFunctionTrigger for async invocation via asyncio.to_thread. - Add deferrable parameter to CloudFunctionInvokeFunctionOperator with execute_complete(). - Register trigger in provider.yaml and get_provider_info.py. - Add unit tests for trigger and operator deferrable path. Closes apache#68908
f4f78ab to
a1ee168
Compare
shahar1
left a comment
There was a problem hiding this comment.
Thanks for your contribution!
Got a couple of comments, please address my comments and make sure that CI is green.
| @@ -0,0 +1 @@ | |||
| Add deferrable support for CloudFunctionInvokeFunctionOperator to invoke Google Cloud Functions asynchronously without blocking workers. | |||
There was a problem hiding this comment.
Please remove this file - we don't use newsfragments in providers
|
|
||
| from googleapiclient.errors import HttpError | ||
|
|
||
| from airflow.configuration import conf |
There was a problem hiding this comment.
Provider code must import via compat SDK
| def execute_complete(self, context: Context, event: dict): | ||
| """Handle trigger completion and process the result.""" | ||
| if event["status"] == "error": | ||
| raise AirflowException(event["message"]) |
There was a problem hiding this comment.
Please use a native Python/custom exception instead
| { | ||
| "integration-name": "Google Cloud Functions", | ||
| "python-modules": ["airflow.providers.google.cloud.triggers.cloud_functions"], | ||
| }, |
There was a problem hiding this comment.
This file shouldn't be changed manually - it seems as not in sync with pre-commit hook (let the pre-commit make the modification for you, if necessary)
| "function_name": self.function_id, | ||
| } | ||
|
|
||
| def execute_complete(self, context: Context, event: dict): |
There was a problem hiding this comment.
Please add type annotation for returned value
Closes #68908
Was generative AI tooling used to co-author this PR?
{pr_number}.significant.rst, in airflow-core/newsfragments. You can add this file in a follow-up commit after the PR is created so you know the PR number.Important
🛠️ Maintainer triage note for @qotique · by
@potiuk· 2026-07-18 15:46 UTCHelpful heads-up from the maintainers — please address before this PR can be reviewed:
See the Pull Request quality criteria for details.
The ball is in your court — you've been assigned to this PR. Fix the above, then mark it Ready for review.
Automated triage — may be imperfect; a maintainer takes the next look.